<#--
A simple FreeMarker template for UML class diagram generation in GraphViz dot format.
-->
digraph G {
	ratio=fill;
    label="UML Class Diagram"; 
    size="5,2"
	graph [label="UML Class Model", fontname="ArialMT", fontsize=18, rankdir=BT, ranksep="1.25", pagedir=LB];
	node [fontname="ArialMT", fontsize=18, shape=record];
	edge [fontname="ArialMT", fontsize=8];

<#foreach element in model.classes>
	${element.simpleName} [
                label = "{${element.simpleName}<#if builder.prop("showAttributes")?exists>|<#list element.getEnclosedElements("field") as field><${element.simpleName}_${field.simpleName}> ${field.simpleName}<#if field_has_next>|</#if></#list></#if>}"
<#if element.is("abstract")>
                fontname="Arial-ItalicMT"</#if>
    ]
</#foreach>

	edge [
                arrowhead = "empty"
        ]
	{
<#foreach element in model.classes>
<#if !model.isObject(element.superclass)>
		"${element.simpleName}" -> "${element.superclass.element.simpleName}"
</#if>
</#foreach>
	}
<#if builder.prop("showAggregation")?exists>
	edge [
                arrowhead = "odiamond"
        ]

	{
<#foreach element in model.classes>
<#foreach field in element.getEnclosedElements("field")>
<#if model.isModelObject(field.type)>
		${field.type.element.simpleName} -> "${element.simpleName}":${element.simpleName}_${field.simpleName}
</#if>	
</#foreach>
</#foreach>

	}
</#if>

}
